package ge.telasi.tasks.model.validation;

import ge.telasi.tasks.model.Group;

/**
 * @author dimitri
 */
public class GroupValidator extends Validator {

    public void validateFull(Group group) {
        validateName(group.getName());
    }

    public void validateName(String groupName) {
        String name = "Group.name";
        String value = groupName;
        new EmptyFieldValidator().validate(name, value);
        new TextRangeValidator(3, 255).validate(name, value);
    }

}
